﻿// ----------------------------------------------------------------------------------
// <copyright file="SimpleContainerExpression.cs" company="Christopher Hines">
// Copyright (c) 2012 All Right Reserved
// </copyright>
// <author>Chris Hines</author>
// <date>2012-02-16</date>
// <summary>
//     Used for fluent API
// </summary>
// ----------------------------------------------------------------------------------

namespace Copperfield.Sdk
{
    /// <summary>
    /// Used for fluent API
    /// </summary>
    /// <typeparam name="TPlugin">The type of plugin</typeparam>
    public class SimpleContainerExpression<TPlugin>
    {
        /// <summary>
        /// Initializes a new instance of the SimpleContainerExpression class
        /// </summary>
        internal SimpleContainerExpression()
        {
        }

        /// <summary>
        /// Configure an instance of the specified plugin
        /// </summary>
        /// <param name="instance">The plugin instance</param>
        public void Use(TPlugin instance)
        {
            SimpleIocContainer.Set(typeof(TPlugin), instance);
        }
    }
}
